package com.itHsuSE.demo1;

public class FloatDetail {
    public static void main(String[] args) {
        double num1=2.7;
        double num2=8.1/3;
        if(num1==num2){
            System.out.println("相等");
        }
        if(Math.abs(num1-num2)<0.000001){
            System.out.println("差值非常小，到我的规定精度，认为相等");
        }
        System.out.println(Math.abs(num1-num2));
    }
}
